﻿<style>
#cenovnici_admin{
	width:700px;
}
#cenovnici_admin input[type=submit]{
	float:right;
}
#cenovnici_admin table tr#dblclicked,
#cenovnici_admin table tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#cenovnici_admin table tr td{
	padding:5px 10px;
}
#ceneBrowseResult{
	margin-top:2px;
}
#ceneBrowseResult table{
	width:100%;
}
#ceneBrowseResult table tr.head{cursor:default}
#ceneBrowseResult table tr{cursor:pointer}
</style>
<div id="cenovnici_admin">
<h1>Cene</h1>
<form class="area" action="javascript:void(0);" onsubmit="submitForm(this,'cenovnik.php','POST','setContent',1)">
<fieldset>
  <legend>Filter</legend>
  	<label class="left" for="filter_artikl">Artikl:</label>
	<select name="filter_artikl" id="filter_artikl">
		<option value="-1">---</option>
		{{%loop start art_id}}
		<option value="{{$art_id}}" {{$filter_artikl_selected}}>{{$art_name}}</option>
		{{%loop end}}
	</select>
	<label class="left" for="filter_tip">Tip:</label>
	<select name="filter_tip" id="filter_tip">
		<option value="-1">---</option>
		{{%loop start art_tip_id}}
		<option value="{{$art_tip_id}}" {{$filter_arttip_selected}}>{{$art_tip_name}}</option>
		{{%loop end}}
	</select>
	<label class="left" for="filter_boja">Boja:</label>
	<select name="filter_boja" id="filter_boja">
		<option value="-1">---</option>
		{{%loop start art_boja_id}}
		<option value="{{$art_boja_id}}" {{$filter_artboja_selected}}>{{$art_boja_name}}</option>
		{{%loop end}}
	</select>
	<label class="left" for="filter_mera">Mera:</label>
	<input type="text" style="width:20px;" name="filter_mera" id="filter_mera" value="{{$filter_mera}}" />
	<select name="filter_jm" id="filter_jm">
		<option value="-1">---</option>
		{{%loop start jm_id}}
		<option value="{{$jm_id}}" {{$jm_selected}}>{{$jm_name}}</option>
		{{%loop end}}
	</select>
	
	<br clear="all" />
	<label class="left" for="filter_cenovnik">Cenovnik:</label>
	<select name="filter_cenovnik" id="filter_cenovnik">
		{{%loop start cenovnik_id}}
		<option value="{{$cenovnik_id}}" title="cenovnik #{{$cenovnik_id}}" start="{{$cenovnik_start}}" {{$cenovnik_selected}}>{{$cenovnik_start_string}}</option>
		{{%loop end}}
	</select>
	<label class="left" for="filter_cena">Cena:</label>
	<input type="text" name="filter_cena" id="filter_cena" value="{{$f_cena}}" />
	<input type="submit" value="filter" />
</fieldset>
</form>
<div class="area" id="ceneBrowseResult">
	<input type="button" id="newPrice" class="novi" value="Nova cena" onclick="novaCena();" />
	<span class="info" style="text-align:right; display:block; margin:5px;">{{$info}}</span>

	{{$start_comment_page}}
	<ul class="letter_filter" style="float:left; clear:both; margin:5px">
		<li><strong style="padding:0px 5px 0px 0px; margin:0px; text-align:left; width:auto;">STRANA:</strong></li>
		{{%loop start page}}
		<li><a href="javascript:void(0)" onclick="LoadRSDoc('cenovnik.php?p={{$page}}{{$filter_string}}','setContent')" {{$selected_page}}>{{$page}}</a></li>
		{{%loop end}}
	</ul>
	{{$end_comment_page}}
	<br clear="all" />
	{{$start_comment}}
	<table>
		<tr class="head" align="center">
			<td style="text-align:left;" width="80%">artikl</td>
			<td>cena</td>
		</tr>
		{{%loop start cena_id}}
		<tr title="CENA:&nbsp;{{$cena_id}}&nbsp;- Kliknite mišem za više opcija..." onclick="showContextMenu(event,this,'initCeneContext({{$cena_id}},{{$cena_cenovnik}},{{$curr_page}})'); event.stopPropagation()">
			<td>{{$cena_artikl}}</td>
			<td align="right">{{$cena_val}}</td>
		</tr>
		{{%loop end}}
	</table>
	{{$end_comment}}
	{{$error_message}}
</div>